const express = require('express');
const router = express.Router();
const controller = require('../controllers/resourcesController');

router.get('/', controller.getAllResources);
router.get('/search', controller.searchResources);
router.get('/:id', controller.getResourceById);
router.post('/', controller.createResource);
router.put('/:id', controller.updateResource);
router.delete('/:id', controller.deleteResource);
router.delete('/deleteAll/:id', controller.deleteResourceAndAllTargets);

module.exports = router;